extends StaticBody2D

@export var item:Item
var player:Player

func _on_interact_body_entered(body:Node2D) -> void:
    if body is Player:player=body;collet()

func collet():
    player.collect(item)
    await get_tree().create_timer(0.1).timeout
    queue_free()
